From 2a218dd2895f9c69b6037aead1b66e9a78ab7c9c Mon Sep 17 00:00:00 2001 From: Ilmari Karonen Date: Wed, 9 May 2007 18:41:05 +0000 Subject: [PATCH] make links to MediaWiki pages blue for messages with default values --- RELEASE-NOTES | 2 ++ includes/SkinTemplate.php | 2 +- includes/Title.php | 9 ++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 72fe6dc062..b6a22b5d87 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -45,6 +45,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 9854, 3770) Clip overflow text in gallery boxes for visual cleanliness instead of letting it flow outside the box or trigger ugly scroll bars. * Tooltips for print version and permalink +* Links to the MediaWiki namespace for system messages having their default + values are no longer shown as redlinks == Maintenance script changes since 1.10 == diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index d776fb8e94..2f61a0b49d 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -591,7 +591,7 @@ class SkinTemplate extends Skin { if( $selected ) { $classes[] = 'selected'; } - if( $checkEdit && $title->getArticleId() == 0 ) { + if( $checkEdit && !$title->isAlwaysKnown() && $title->getArticleId() == 0 ) { $classes[] = 'new'; $query = 'action=edit'; } diff --git a/includes/Title.php b/includes/Title.php index b108e66dfd..1e2bff6693 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2407,11 +2407,14 @@ class Title { * Should a link should be displayed as a known link, just based on its title? * * Currently, a self-link with a fragment and special pages are in - * this category. Special pages never exist in the database. + * this category. Special pages never exist in the database. System + * messages that have defined default values are also always known. */ public function isAlwaysKnown() { - return $this->isExternal() || ( 0 == $this->mNamespace && "" == $this->mDbkeyform ) - || NS_SPECIAL == $this->mNamespace; + return ( $this->isExternal() || + ( 0 == $this->mNamespace && "" == $this->mDbkeyform ) || + ( NS_SPECIAL == $this->mNamespace ) || + ( NS_MEDIAWIKI == $this->mNamespace && wfMsgWeirdKey( $this->mDbkeyform ) ) ); } /** -- 2.20.1